import Main from "@/components/main/main";

export const routers = [
    {
        path: "/login",
        name: "login",
        meta: {
            hide: true,
            title: "登录"
        },
        component: () => import("@/views/login/login")
    },
    {
        path: "/",
        name: "Dashboard",
        component: Main,
        meta: {
            hide: false,
            title: "Dashboard",
            icon: "md-speedometer",
        },
        children: [
            {
                path: "/Dashboard/master_workplace",
                name: "master_workplace",
                meta: {
                    hide: false,
                    title: "主控台"
                },
                component: () => import("@/views/Dashboard/master_workplace")
            },
            {
                path: "/Dashboard/workplace",
                name: "workplace",
                meta: {
                    hide: false,
                    title: "工作台",
                    permission: ['admin']
                },
                component: () => import("@/views/Dashboard/workplace")
            },
        ]
    },
    {
        path: "/form",
        name: "form",
        component: Main,
        meta: {
            hide: false,
            title: "表单页面",
            icon: "md-cube",
            permission: ['admin1','admin']
        },
        children: [
            {
                path: "/form/basic_form",
                name: "basic-form",
                meta: {
                    hide: false,
                    title: "基础表单",
                    permission: ['admin']
                },
                component: () => import("@/views/form/basic_form")
            },
            {
                path: "/form/advanced_form",
                name: "advanced_form",
                meta: {
                    hide: false,
                    title: "高级表单",
                    permission: ['admin']
                },
                component: () => import("@/views/form/advanced_form")
            },
        ]
    },
    {
        path: "/list",
        name: "list",
        component: Main,
        meta: {
            hide: false,
            title: "列表页面",
            icon: "md-grid",
            permission: ['admin1','admin']
        },
        children: [
            {
                path: "/list/basic_list",
                name: "basic_list",
                meta: {
                    hide: false,
                    title: "基础列表",
                    permission: ['admin']
                },
                component: () => import("@/views/list/basic_list")
            },
            {
                path: "/list/user_list",
                name: "user_list",
                meta: {
                    hide: false,
                    title: "用户列表",
                    permission: ['admin']
                },
                component: () => import("@/views/list/user_list")
            },
            {
                path: "/list/goods_list",
                name: "goods_list",
                meta: {
                    hide: false,
                    title: "商品列表",
                    permission: ['admin']
                },
                component: () => import("@/views/list/goods_list")
            }
        ]
    },
    {
        path: "/search",
        name: "search",
        component: Main,
        meta: {
            hide: false,
            title: "搜索页面",
            icon: "md-search",
            permission: ['admin1','admin']
        },
        children: [
            {
                path: "/search/search_article",
                name: "search_article",
                meta: {
                    hide: false,
                    title: "搜索列表（文章）",
                    permission: ['admin']
                },
                component: () => import("@/views/search/search_article")
            },
            {
                path: "/search/search_projects",
                name: "search_projects",
                meta: {
                    hide: false,
                    title: "搜索列表（项目）",
                    permission: ['admin']
                },
                component: () => import("@/views/search/search_projects")
            }
        ]
    },
    {
        path: "/detail",
        name: "detail",
        component: Main,
        meta: {
            hide: false,
            title: "详情页面",
            icon: "md-list-box",
            permission: ['admin1','admin']
        },
        children: [
            {
                path: "/detail/basic_detail",
                name: "basic_detail",
                meta: {
                    hide: false,
                    title: "基础详情",
                    permission: ['admin']
                },
                component: () => import("@/views/detail/basic_detail")
            },
            {
                path: "/detail/advanced_detail",
                name: "advanced_detail",
                meta: {
                    hide: false,
                    title: "高级详情",
                    permission: ['admin']
                },
                component: () => import("@/views/detail/advanced_detail")
            }
        ]
    },
    {
        path: "/result",
        name: "result",
        component: Main,
        meta: {
            hide: false,
            title: "结果页面",
            icon: "md-checkmark-circle-outline",
            permission: ['admin1','admin']
        },
        children: [
            {
                path: "/result/result_success",
                name: "result_success",
                meta: {
                    hide: false,
                    title: "成功页面",
                    permission: ['admin']
                },
                component: () => import("@/views/result/result_success")
            },
            {
                path: "/result/result_fail",
                name: "result_fail",
                meta: {
                    hide: false,
                    title: "失败页面",
                    permission: ['admin']
                },
                component: () => import("@/views/result/result_fail")
            }
        ]
    },
    {
        path: "/setting",
        name: "setting",
        component: Main,
        meta: {
            hide: false,
            title: "设置页面",
            icon: "md-options",
            permission: ['admin1','admin']
        },
        children: [
            {
                path: "/setting/setting_user",
                name: "setting_user",
                meta: {
                    hide: false,
                    title: "个人中心",
                    permission: ['admin']
                },
                component: () => import("@/views/setting/setting_user")
            },
            {
                path: "/setting/setting_account",
                name: "setting_account",
                meta: {
                    hide: false,
                    title: "个人设置",
                    permission: ['admin']
                },
                component: () => import("@/views/setting/setting_account")
            }
        ]
    },
    {
        path: "/editor",
        name: "editor",
        component: Main,
        meta: {
            hide: false,
            title: "编辑器",
            icon: "ios-create-outline",
        },
        children: [
            {
                path: "/editor/wangEditor",
                name: "editor_wangEditor",
                meta: {
                    hide: false,
                    title: "wangEditor",
                    icon: 'ios-create-outline'
                },
                component: () => import("@/views/editor/wangEditor")
            }
        ]
    },
    {
        path: "/city",
        name: "city",
        component: Main,
        meta: {
            hide: false,
            title: "高级组件",
            icon: "ios-paper-plane-outline",
        },
        children: [
            {
                path: "/city/city",
                name: "city_city",
                meta: {
                    hide: false,
                    title: "城市选择",
                    icon: 'ios-create-outline'
                },
                component: () => import("@/views/city/city")
            }
        ]
    },
    {
        path: "/brief",
        name: "brief",
        component: Main,
        meta: {
            hide: false,
            title: "简叙",
            icon: "md-heart-outline",
        },
        children: [
            {
                path: "/brief/brief",
                name: "brief_brief",
                meta: {
                    hide: false,
                    title: "简叙",
                    icon: 'md-heart-outline'
                },
                component: () => import("@/views/brief/brief")
            }
        ]
    },
]